package com.bzoa.api.config;


import com.springboot.common.entity.ResponseStatus;

/**
 * 文件名: BusinessException
 * 创建者: lands
 * 创建时间:2023/3/3 0:56
 * 描述:自定义业务异常类
 */
public class BusinessException extends RuntimeException {
    private int code;
    private String msg;

    public BusinessException(ResponseStatus responseStatus) {
        this.code = responseStatus.getCode();
        this.msg = responseStatus.getMessage();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}